package airlinesystem;

import java.sql.Time;
import java.util.HashSet;
import java.util.Set;

/**
 * 
 * @author Robert Maaskant & Dennis van der Zwet
 *
 */
public class RegularFlight
{
  /**
   * The airline providing this RegularFlight
   */
  private Airline airline;
  /**
   * The flights that implement this SpecificFlight
   */
  private Set<SpecificFlight> specificFlights;
  /**
   * The time this flight departs
   */
  private Time time;
  /**
   * The flightnumber for this flight
   */
  private int flightNumber;

  /**
   * Constructor for RegularFlight
   * @param airline the airline that provides this RegularFlight
   * @param time the time that this flight departs
   * @param flightNumber the flightnumber for this flight
   */
  public RegularFlight(Airline airline, Time time, int flightNumber)
  {
    this.airline = airline;
    this.time = time;
    this.flightNumber = flightNumber;
    specificFlights = new HashSet<SpecificFlight>();
  }

  /**
   * Adds a specific flight that implements this RegularFlight
   * @param f the SpecificFlight to add
   */
  public void addSpecificFlight(SpecificFlight f)
  {
    specificFlights.add(f);
  }

}
